#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#

#-*- mode: pythos; -*-

import platform
if platform.system() == 'Darwin':
    Return()

Import('AgentEnv')
env = AgentEnv.Clone()

SandeshGenFiles = env.SandeshGenCpp('agent_ksync.sandesh')
SandeshGenFiles += env.SandeshGenCpp('../../../../vrouter/sandesh/vr.sandesh')
SandeshGenSrcs = env.ExtractCpp(SandeshGenFiles)
sandesh_objs = AgentEnv.BuildExceptionCppObj(env, SandeshGenSrcs)

if platform.system() == 'Linux':
    except_files = [ 'vnswif_listener_base.cc', 'linux/vnswif_listener.cc' ]
elif platform.system() == 'FreeBSD':
    except_files = [ 'vnswif_listener_base.cc', 'freebsd/vnswif_listener.cc' ]
elif platform.system() == 'Windows':
    except_files = [ 'windows/vnswif_listener.cc' ]

except_objs = AgentEnv.BuildExceptionCcObj(env, except_files)

libksync = env.Library('vnswksync',
                       sandesh_objs +
                       except_objs +
                       [
                        'ksync_agent_sandesh.cc',
                        'bridge_route_audit_ksync.cc',
                        'ksync_bridge_table.cc',
                        'flowtable_ksync.cc',
                        'forwarding_class_ksync.cc',
                        'interface_ksync.cc',
                        'ksync_flow_index_manager.cc',
                        'ksync_flow_memory.cc',
                        'ksync_memory.cc',
                        'ksync_init.cc',
                        'mirror_ksync.cc',
                        'mpls_ksync.cc',
                        'nexthop_ksync.cc',
                        'qos_config_ksync.cc',
                        'qos_queue_ksync.cc',
                        'route_ksync.cc',
                        'sandesh_ksync.cc',
                        'vxlan_ksync.cc',
                        'vrf_assign_ksync.cc'
                       ])

env.SConscript('test/SConscript', exports='AgentEnv', duplicate = 0)
